import request from "@/utils/request";

// 获取订单列表

export const getOrderList = (data) => {
  return request.get("/order", {
    params: data,
  });
};

// 获取订单详情
export const getOrderDetail = (id) => {
  return request.get(`/order/${orderId}`);
};

// 添加订单
export const addOrder = (data) => {
  return request.post("/order", data);
};

// 获取自己的订单列表
export const getMyOrderList = (params) => {
  return request.get("/order/getMyOrder", { params });
};

// 修改订单状态
export const updateOrderStatus = (data) => {
  return request.put(`/order/status`, data);
};

// 修改订单信息
export const updateOrder = (data) => {
  return request.put(`/order/data`, data);
};

// 删除订单
export const deleteOrder = (id) => {
  return request.delete(`/order/${id}`);
};
